priv = handle->priv;
context = gtk_widget_get_style_context (priv->parent);
+ _gtk_text_handle_get_size (handle, &width, &height);
cairo_save (cr);
if (pos == GTK_TEXT_HANDLE_POSITION_SELECTION_END)
- cairo_translate (cr, 0, priv->windows[pos].pointing_to.height);
+ cairo_translate (cr, width, priv->windows[pos].pointing_to.height);
+ else
+ cairo_translate (cr, width, height);
gtk_style_context_save (context);
gtk_style_context_add_class (context,
gtk_style_context_add_class (context,
GTK_STYLE_CLASS_TOP);
- _gtk_text_handle_get_size (handle, &width, &height);
gtk_render_background (context, cr, 0, 0, width, height);
gtk_style_context_restore (context);
rect.width = width;
rect.height = 0;
+ /* Make the window 3 times as wide, and 2 times as high (plus
+ * handle_window->pointing_to.height), the handle will be rendered
+ * in the center. Making the rest an invisible input area.
+ */
+ width *= 3;
+ height *= 2;
+
_handle_update_child_visible (handle, pos);
window = gtk_widget_get_parent (handle_window->widget);